package com.partners.dao.basic;

import com.partners.dao.bo.AddressDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AddressDao {
    int deleteByPrimaryKey(Integer id);

    int insert(AddressDO record);

    int insertSelective(AddressDO record);

    AddressDO selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AddressDO record);

    int updateByPrimaryKey(AddressDO record);

    List<AddressDO> selectByUid(@Param("uid") Integer uid);

    Integer existAddress(@Param("name") String name,
                         @Param("uid") Integer uid,
                         @Param("phone") Long phone,
                         @Param("address") String address,
                         @Param("id") Integer id);

    Integer getAddressByUid(Integer uid);

    void updateDetaultByUid(@Param("uid") Integer uid);
}
